package service.impl;

import dao.impl.BookManageDaoImpl;
import entity.BookManage;
import service.BookManageService;
import utils.DataBaseUtil;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class BookManageServiceImpl implements BookManageService{
    @Override
    public List<BookManage> findAll() {
        List<BookManage> books=null;
        try {
            Connection connection = DataBaseUtil.getConnection();
            books=new BookManageDaoImpl(connection).findAll();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return books;
    }

    @Override
    public int insert(BookManage book) {
        return 0;
    }

    @Override
    public int deleteById(String id) {
        return 0;
    }
}
